1. Field of the Invention
The invention relates generally to systems and methods for managing the communication between master and slave devices. More particularly, the invention relates to systems and methods for increasing the efficiency of communicating to master devices the availability of slave devices to accept commands from the master devices.
2. Related Art
Many of today's high-performance systems include a plurality of processors as well as a plurality of other devices—such as memories and input/output (I/O) devices. The processors typically act as master devices that control, communicate with, and send commands to the other devices that act as slaves. Memories, for example, act as slaves. I/O devices can typically act as both masters and slaves. Communication between the master and slave devices in such systems is typically accomplished with a bus that interconnects all of these devices. In many recent multiprocessor systems, the masters and the slaves are connected by a more sophisticated interconnection network such as a crossbar switch, a ring, a torus, or the like. Because many tightly coupled multiprocessor systems require coherent memory systems, and because most of them require the address/command interconnections to logically behave as “coherent bus,” such interconnection networks will be referred to in this disclosure as “buses.” Busses have limited bandwidth that must be shared between all the devices on the bus. The communications between the different devices should therefore be as efficient as possible. For example, any unnecessary communication that uses up bandwidth on the bus should be eliminated.
Master devices such as processors control slave devices by sending commands and other instructions to the slave devices over the bus. In one embodiment, a slave device has a buffer for holding commands until they can be serviced by the slave. Before sending a command to a slave device, in this embodiment, the master device must determine that the slave device's buffer has available slots to accept the command/instructions. Otherwise, the slave device retries the command and the master has to send the command again. If many commands must be retried, the bandwidth of the address/command bus is consumed by useless transactions, and the performance of the system is reduced. An inquiry to determine the availability of a slave device is therefore sent by the master device, and a response is sent back by the slave device indicating whether the slave device's buffer has available slots. If a slave device responds that buffer slots are available, the master device can send a command or other instruction to the slave device. Such inquiry/response-type communications require bus bandwidth and can thus have an effect on the system's performance.
One way to reduce the number of such inquiry/response-type communications and to optimize the utility the bus is to implement a token methodology. If a slave device has available slots in its buffer, the slave device sends one or more tokens that identify the slave device to a global token manager. The number of tokens sent by the slave device is equal to the available buffer slots. When a master device needs to send a command to a particular slave device, the master device sends a request to the token manager asking for a token corresponding to that particular slave device. If a token corresponding to that slave is available, the master can send the command to the slave device over the internal bus. If a token corresponding to that slave device is not available, the master device does not send the command and may or may not resubmit a request for a token at a later time.
Though very beneficial to the bus bandwidth, implementation of the token methodology requires additional steps/clock cycles. Typically, the local token manager in the master first decodes the command that it needs to send in order to determine which type of token is required. After the token type has been determined, the local token manager in the master sends the token request to the global token manager, and the global token manager sends back the token to the local token manager if the requested token is available in the global token manager. In today's high-speed systems, the steps/clock cycles required to complete this process each time a request is made can adversely affect performance.
What is needed, therefore, are systems and methods that can increase the speed and efficiency of communication between master and slave devices by reducing the time required to process requests for tokens.